package com.yumeno.market_goods.controller;

import com.yumeno.market_goods.dao.UserDao;
import com.yumeno.market_goods.pojo.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;


@Controller
public class IndexController {
    @Resource
    private UserDao userDao;

    @RequestMapping("/")
//    @ResponseBody  //表示返回json字符串给前端
    String index(){
        User user=userDao.selectByPrimaryKey(1);
        return "index";
    }
}
